<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>gamvas.physics</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/prettify.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.51 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="gamvas.physics"></a>gamvas.<wbr>physics</h1><div class=CBody><p>Physics functions</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#gamvas.physics" >gamvas.<wbr>physics</a></td><td class=SDescription>Physics functions</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#gamvas.physics.Macros" >Macros</a></td><td class=SDescription></td></tr><tr class="SMacro SIndent2 SMarked"><td class=SEntry><a href="#gamvas.physics.DYNAMIC" >DYNAMIC</a></td><td class=SDescription>define for a dynamic body</td></tr><tr class="SMacro SIndent2"><td class=SEntry><a href="#gamvas.physics.STATIC" >STATIC</a></td><td class=SDescription>define for a static body</td></tr><tr class="SMacro SIndent2 SMarked"><td class=SEntry><a href="#gamvas.physics.KINEMATIC" >KINEMATIC</a></td><td class=SDescription>define for a kinematic body</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#gamvas.physics.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#gamvas.physics.pixelsPerMeter" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">pixelsPerMeter</a></td><td class=SDescription>Sets the pixels per meter ratio. </td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#gamvas.physics.velocityIterations" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">velocityIterations</a></td><td class=SDescription>Sets the Box2D velocity iteration steps</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#gamvas.physics.positionIterations" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">positionIterations</a></td><td class=SDescription>Sets the Box2D position iteration steps</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#gamvas.physics.debugAlpha" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">debugAlpha</a></td><td class=SDescription>The alpha of physics debug information</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#gamvas.physics.debugStrokeWidth" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">debugStrokeWidth</a></td><td class=SDescription>The stroke width if you draw physics debug information</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#gamvas.physics.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.physics.toScreen" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">toScreen</a></td><td class=SDescription>Calculates a physics coordinate or size to the screen coordinate or size</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.physics.toWorld" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">toWorld</a></td><td class=SDescription>Calculates a screen coordinate or size to a coordinate or size in the physics world</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.physics.drawDebug" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">drawDebug</a></td><td class=SDescription>Draw the physics debug information. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.physics.setGravity" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">setGravity</a></td><td class=SDescription>Sets the physics worlds gravity to a <a href="gamvas-vector2d-js.html#gamvas.Vector2D" class=LClass id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">gamvas.Vector2D</a></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.physics.resetWorld" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">resetWorld</a></td><td class=SDescription>Resets the physics world</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.physics.getWorld" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">getWorld</a></td><td class=SDescription>Get the Box2D world object</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.Macros"></a>Macros</h3></div></div>

<div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.DYNAMIC"></a>DYNAMIC</h3><div class=CBody><p>define for a dynamic body</p><p>Dynamic bodies are the objects that are under influence of forces</p></div></div></div>

<div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.STATIC"></a>STATIC</h3><div class=CBody><p>define for a static body</p><p>Static bodies are the objects that do never move, like walls or ground objects</p></div></div></div>

<div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.KINEMATIC"></a>KINEMATIC</h3><div class=CBody><p>define for a kinematic body</p><p>Kinematic bodies are objects that move, but not by physics engine, but by either player input or AI</p></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.Variables"></a>Variables</h3></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.pixelsPerMeter"></a>pixelsPerMeter</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">pixelsPerMeter: 64</td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Sets the pixels per meter ratio.&nbsp; The physics engine calculates in meters, so if for example you have a car that is 4 meters long, then you set a bounding box with the with of &lsquo;4&rsquo; for the physics engine, ofcourse a car with 4 pixels in size would be only hard so see on the screen, so you can set a pixels per meter ratio.&nbsp; Default is 64, so the image for your 4 meter long car would have to be 256 pixels in with.</p><h4 class=CHeading>Default</h4><p>64</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.velocityIterations"></a>velocityIterations</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">velocityIterations: 10</td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Sets the Box2D velocity iteration steps</p><h4 class=CHeading>Default</h4><p>10</p><h4 class=CHeading>See</h4><p><a href="http://box2d.org/manual.html" class=LURL target=_top>http://box2d.org/manual.html</a></p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.positionIterations"></a>positionIterations</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">positionIterations: 8</td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Sets the Box2D position iteration steps</p><h4 class=CHeading>Default</h4><p>8</p><h4 class=CHeading>See</h4><p><a href="http://box2d.org/manual.html" class=LURL target=_top>http://box2d.org/manual.html</a></p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.debugAlpha"></a>debugAlpha</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">debugAlpha: 0.3</td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>The alpha of physics debug information</p><h4 class=CHeading>Default</h4><p>0.3</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.debugStrokeWidth"></a>debugStrokeWidth</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">debugStrokeWidth: 2</td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>The stroke width if you draw physics debug information</p><h4 class=CHeading>Default</h4><p>2</p></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.toScreen"></a>toScreen</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>toScreen: function(</td><td class="PParameter  prettyprint " nowrap>v</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Calculates a physics coordinate or size to the screen coordinate or size</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>v</td><td class=CDLDescription>the physics value</td></tr></table><h4 class=CHeading>Examples</h4><blockquote><pre>var physPos = myActor.body.GetPosition();
var screenX = gamvas.physics.toScreen(physPos.x);</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.toWorld"></a>toWorld</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>toWorld: function(</td><td class="PParameter  prettyprint " nowrap>v</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Calculates a screen coordinate or size to a coordinate or size in the physics world</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>v</td><td class=CDLDescription>the screen value</td></tr></table><h4 class=CHeading>Examples</h4><blockquote><pre>var startPos = new gamvas.Vector2D(640, 480);
myActor.body.SetPosition(
   new Box2D.Common.Math.b2Vec2(
      gamvas.physics.toWorld(startPos.x),
      gamvas.physics.toWorld(startPos.y)
   )
);</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.drawDebug"></a>drawDebug</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">drawDebug: function()</td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Draw the physics debug information.&nbsp; Should be used after all objects are drawn.&nbsp; This is a reduced debug information with simpler handling then the Box2D version, you still can use the Box2D way though.</p><h4 class=CHeading>Example</h4><blockquote><pre>myState = gamvas.State.extend({
    draw: function(t) {
        this.drawAllObjects(t);
        gamvas.physics.drawDebug();
    }
});</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.setGravity"></a>setGravity</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setGravity: function(</td><td class="PParameter  prettyprint " nowrap>vec</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Sets the physics worlds gravity to a <a href="gamvas-vector2d-js.html#gamvas.Vector2D" class=LClass id=link13 onMouseOver="ShowTip(event, 'tt10', 'link13')" onMouseOut="HideTip('tt10')">gamvas.Vector2D</a></p><h4 class=CHeading>Example</h4><p>myState = gamvas.State.extend({ draw: function(t) { // ajust gravity to camera rotation var rot = this.camera.rotation; var vec = new gamvas.Vector2D(0.&nbsp; 9.8); gamvas.physics.setGravity(vec.rotate(-r)); } });</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.resetWorld"></a>resetWorld</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>resetWorld: function(</td><td class="PParameter  prettyprint " nowrap>gravx,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>gravy,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>slp,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>listener</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Resets the physics world</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>gravx</td><td class=CDLDescription>the gravity in x direction (meters per second) (optional, default 0)</td></tr><tr><td class=CDLEntry>gravy</td><td class=CDLDescription>the gravity in y direction (meters per second) (optional, default 9.8)</td></tr><tr><td class=CDLEntry>slp</td><td class=CDLDescription>enable sleeping (optional, default true)</td></tr><tr><td class=CDLEntry>listener</td><td class=CDLDescription>a Box2D.Dynamics.b2ContactListener (optional)</td></tr></table><p>When sleeping is enabled, objects that have not moved for a while fall into a sleep state so they are not simulated until a collider hits them.</p><p>If no listener is specified (recommende) a default listener is installed, that handles the actor collision.&nbsp; Usually this should be enough for almost any purpose, but if you are a total Box2D guru, you might use a own listener</p><h4 class=CHeading>Note</h4><p>Box2D and Gamvas differ in how the y coordinte is handled.&nbsp; While Box2D tries to resemble real world sitation where a positive y coordinte would go upward, gamvas is a 2D raster graphics game engine, where a positive y coordinate would go downward.</p><p>This leaves two special things that you should know.</p><p>A) While in real world, gravity is roughly -9.8 (negative) meters per second, in gamvas the default gravity is +9.8 (positive) to make objects fall down</p><p>B) While Box2D asks you to use counter clock wise (CCW) polygons, in gamvas you have to specify clock wise polygons</p><h4 class=CHeading>Example</h4><p>Start with a new empty world with default settings</p><blockquote><pre>gamvas.resetWorld();</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.physics.getWorld"></a>getWorld</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">getWorld: function()</td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Get the Box2D world object</p><h4 class=CHeading>Returns</h4><p>The Box2D world object</p><h4 class=CHeading>See</h4><p><a href="https://code.google.com/p/box2dweb/" class=LURL target=_top>https://code.google.com/p/box2dweb/</a></p><p><a href="http://www.box2d.org/" class=LURL target=_top>http://www.box2d.org/</a></p></div></div></div>

</div><!--Content-->


<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->


<div id=Menu><div class=MEntry><div class=MFile><a href="gamvas-base-js.html">gamvas</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-actor-js.html">gamvas.<wbr>Actor</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-actorstate-js.html">gamvas.<wbr>ActorState</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-animation-js.html">gamvas.<wbr>Animation</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-camera-js.html">gamvas.<wbr>Camera</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-class-js.html">gamvas.<wbr>Class</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-dom-js.html">gamvas.dom</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-event-js.html">gamvas.<wbr>event</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-image-js.html">gamvas.<wbr>Image</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-key-js.html">gamvas.key</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-mouse-js.html">gamvas.<wbr>mouse</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-particleemitter-js.html">gamvas.<wbr>ParticleEmitter</a></div></div><div class=MEntry><div class=MFile id=MSelected>gamvas.<wbr>physics</div></div><div class=MEntry><div class=MFile><a href="gamvas-physics-userdata-js.html">gamvas.<wbr>physics.<wbr>UserData</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-rect-js.html">gamvas.Rect</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-resource-js.html">gamvas.<wbr>Resource</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-screen-js.html">gamvas.<wbr>screen</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-sound-js.html">gamvas.<wbr>Sound</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-state-js.html">gamvas.<wbr>state</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-state-state-js.html">gamvas.<wbr>State</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-timer-js.html">gamvas.<wbr>timer</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-vector2d-js.html">gamvas.<wbr>Vector2D</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Macros.html">Macros</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option  id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Functions">Functions</option><option value="Macros">Macros</option><option value="Variables">Variables</option></select></div></div><!--Menu-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">pixelsPerMeter: 64</td></tr></table></blockquote>Sets the pixels per meter ratio. </div></div><div class=CToolTip id="tt2"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">velocityIterations: 10</td></tr></table></blockquote>Sets the Box2D velocity iteration steps</div></div><div class=CToolTip id="tt3"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">positionIterations: 8</td></tr></table></blockquote>Sets the Box2D position iteration steps</div></div><div class=CToolTip id="tt4"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">debugAlpha: 0.3</td></tr></table></blockquote>The alpha of physics debug information</div></div><div class=CToolTip id="tt5"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">debugStrokeWidth: 2</td></tr></table></blockquote>The stroke width if you draw physics debug information</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>toScreen: function(</td><td class="PParameter  prettyprint " nowrap>v</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Calculates a physics coordinate or size to the screen coordinate or size</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>toWorld: function(</td><td class="PParameter  prettyprint " nowrap>v</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Calculates a screen coordinate or size to a coordinate or size in the physics world</div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">drawDebug: function()</td></tr></table></blockquote>Draw the physics debug information. </div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setGravity: function(</td><td class="PParameter  prettyprint " nowrap>vec</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Sets the physics worlds gravity to a gamvas.Vector2D</div></div><div class=CToolTip id="tt10"><div class=CClass>A 2D vector class</div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>resetWorld: function(</td><td class="PParameter  prettyprint " nowrap>gravx,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>gravy,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>slp,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>listener</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Resets the physics world</div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">getWorld: function()</td></tr></table></blockquote>Get the Box2D world object</div></div><!--END_ND_TOOLTIPS-->




<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>


<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>